package com.yaodian100.ec.timelimitsale.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author apple.chang
 * 
 */

@Entity
@Table(name = "EC_TIME_LIMIT_MAIN")
public class TimeLimitMain extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4448778651334988195L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_time_limit_main")
	@SequenceGenerator(name = "seq_ec_time_limit_main", sequenceName = "SEQ_EC_TIME_LIMIT_MAIN")
	@Column(name = "ID")
	private Long id;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "SALE_DATE", nullable = false)
	private Date saleDate;

	/**
	 * 活动名稱
	 */
	@Column(name = "NAME", nullable = false, length = 20)
	private String name;

	/**
	 * 目錄編號
	 */
	@Column(name = "CATEGORY_ID", nullable = false)
	private int categoryID;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getSaleDate() {
		return saleDate;
	}

	public void setSaleDate(Date saleDate) {
		this.saleDate = saleDate;
	}

	public int getCategoryID() {
		return categoryID;
	}

	public void setCategoryID(int categoryID) {
		this.categoryID = categoryID;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}